//
//  LXNewsDetailController.m
//  绿稀全球购
//
//  Created by 王敏 on 16/6/14.
//  Copyright © 2016年 SJT. All rights reserved.
//

#import "LXNewsDetailController.h"

#import "NSString+LxString.h"

#import <math.h>

@interface LXNewsDetailController ()
@property(nonatomic,strong)UIWebView * web;

@property(nonatomic,strong)UILabel * timeLabel;

@property(nonatomic,copy)NSString * content;
@end

@implementation LXNewsDetailController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setUpNavi];
    self.view.backgroundColor = [UIColor whiteColor];

    [self loadData];
    [self setUpView];
}

-(void)setUpView
{
    UIView * contentView = [[UIView alloc] initWithFrame:CGRectMake(0, 64, ScreenSize.width, 70)];
    contentView.backgroundColor = HexColor(@"#cccccc");
    [self.view addSubview:contentView];
    
    UILabel * statuLabel = [[UILabel alloc] init];
    statuLabel.text = @"置顶";
    statuLabel.font = [UIFont systemFontOfSize:14];
    statuLabel.textAlignment = NSTextAlignmentCenter;
    statuLabel.textColor = [UIColor whiteColor];
    statuLabel.width = [statuLabel.text sizeInAre:MaxSize font:statuLabel.font].width+10;
    statuLabel.height = [statuLabel.text sizeInAre:MaxSize font:statuLabel.font].height+2;
    statuLabel.x = 10 ;
    statuLabel.y = 10;
    [statuLabel addRadius:2];
    statuLabel.backgroundColor = RGBColor(253, 124, 7);
//    [contentView addSubview:statuLabel];
    
    UILabel * titleLabel = [[UILabel alloc] init];
//    titleLabel.text = self.news.node_name;
    titleLabel.textAlignment = NSTextAlignmentLeft;
    titleLabel.font = [UIFont systemFontOfSize:20];
    titleLabel.width = ScreenSize.width - statuLabel.right - 20;
    titleLabel.height = contentView.height * 0.291;
    [contentView addSubview:titleLabel];
    titleLabel.x = statuLabel.right + 10;
    titleLabel.centerY = statuLabel.centerY;
    
    UILabel * timeLabel = [[UILabel alloc] init];
//    timeLabel.text = @"2016-07-09 16:52";
    timeLabel.font = [UIFont systemFontOfSize:10];
    timeLabel.textAlignment = NSTextAlignmentLeft;
    timeLabel.width = ScreenSize.width;
    timeLabel.height = 30;
    timeLabel.x = 10;
    timeLabel.y = statuLabel.botton + 5;
    self.timeLabel = timeLabel;
    [contentView addSubview:timeLabel];
    
    
    UIWebView * web = [[UIWebView alloc] initWithFrame:CGRectMake(0, 100, ScreenSize.width, ScreenSize.height-100)];
    web.y = contentView.botton;
    web.height = ScreenSize.height-contentView.botton;
    web.backgroundColor = [UIColor clearColor];
    self.web = web;
    [self.view addSubview:web];
}


-(void)loadData
{
   
}

-(void)setUpNavi{
    self.navigationItem.title = @"fgjogh";

}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}


@end
